<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>EaselJS Example: Text</title>

	<link href="../_assets/css/shared.css" rel="stylesheet" type="text/css"/>
	<link href="../_assets/css/examples.css" rel="stylesheet" type="text/css"/>
	<script src="../_assets/js/examples.js"></script>

	<script src="../lib/easeljs-NEXT.js"></script>
	<!-- We also provide hosted minified versions of all CreateJS libraries.
	  http://code.createjs.com -->

<script id="editable">
	function init() {
		// get a reference to the canvas we'll be working with:
		var canvas = document.getElementById("testCanvas");

		// create a stage object to work with the canvas. This is the top level node in the display list:
		var stage = new createjs.Stage(canvas);

		// Create a new Text object:
		var text = new createjs.Text("Hello World!", "36px Arial", "#777");
		text.textAlign = "center";

		// add the text as a child of the stage. This means it will be drawn any time the stage is updated
		// and that its transformations will be relative to the stage coordinates:
		stage.addChild(text);

		// position the text on screen, relative to the stage coordinates:
		text.x = canvas.width / 2;
		text.y = 180;

		// call update on the stage to make it render the current display list to the canvas:
		stage.update();
	}
</script>
</head>

<body onload="init();">

<header class="EaselJS">
	<h1>Hello World!</h1>

	<p>Hello World example using <code>Text</code> and <code>Stage</code>.</p>
</header>

<div>
	<canvas id="testCanvas" width="960" height="400"></canvas>
</div>
</body>
</html>
